import tweepy

consumer_key="GahOOLF67J09yD6pe99YlUIQE"
consumer_secret="bw5Ks3i4Fbx2WWhhdmXR7lumJkvUubjbKNL8MrgxYihutKDgJ0"
access_token="821980639461195776-j4HXtSffLMlXmznaNWGm73r8DtZaYiJ"
access_token_secret="eQ3Qa5SQJilTJTeD5pdAgJxJXzTmHBYvWo5nLnVxAueVx"

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)

api = tweepy.API(auth)

# class MyStreamListener(tweepy.StreamListener):
#
#     def on_status(self, status):
#         print(status.text)
#
# myStreamListener = MyStreamListener()
# myStream = tweepy.Stream(auth = api.auth, listener=myStreamListener)
# myStream.filter(track=['python'])

def rebuilt_twit():
	#if no config/ids

	try:
		temptwit = requests.get('https://api.stocktwits.com/api/2/messages/show/' + str(twit["id"]) + '.json?access_token=' + conf["stocktwits"]["api"]["app"]["token"]).json()
		print temptwit

	except ValueError:
		return None